#include <vector>
using namespace std;
class Solution
{
public:
    // 夹bi法
    vector<int> twoSum(vector<int> &numbers, int target)
    {
        for (int i = 0, j = numbers.size() - 1; 1;)
        {
            int sum = numbers[i] + numbers[j];
            if (target < sum)
                j--;
            else if (target > sum)
                i++;
            else
                return {i, j};
        }
        return {};
    }
};